package com.mineplatform.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.mineplatform.dao.M_AppInfoDao;
import com.mineplatform.domain.M_AppInfo;
import com.mineplatform.exception.AppInfoNotExistException;
import com.mineplatform.iservice.IM_AppInfoService;

@Service
public class M_AppInfoService implements IM_AppInfoService {

	private M_AppInfoDao _m_appinfodao;

	@Autowired
	public M_AppInfoService(M_AppInfoDao m_minedao) {
		this._m_appinfodao = m_minedao;
	}

	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	public M_AppInfo findAppInfo() throws AppInfoNotExistException {

		M_AppInfo appInfo = this._m_appinfodao.findAppInfo();

		if (appInfo == null) {
			throw new AppInfoNotExistException();
		}

		return this._m_appinfodao.findAppInfo();

	}
}
